package com.youzan.open.sdk.gen.v3_0_0.model;

import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
import com.youzan.open.sdk.model.APIParams;
import com.youzan.open.sdk.model.ByteWrapper;
import com.youzan.open.sdk.model.FileParams;
import java.util.List;
import java.util.Map;
import java.util.Date;

public class YouzanLogisticsLocalSetParams implements APIParams, FileParams  {

    /**
     * 最多提前几天下订单, 仅限当天：0
     */
    private Long aheadMax;
    /**
     * 最多提前几天下订单, 类型, 默认 DAY
     */
    private String aheadMaxType;
    /**
     * 订单开始的偏移量
     */
    private Long aheadMin;
    /**
     * 订单结束的偏移量   目前默认单位：DAY 日；HOUR 小时；HALFHOUR分钟
     */
    private String aheadMinType;
    /**
     * 配送区域图片
     */
    private String attachPic;
    /**
     * 配送费用
     */
    private Long deliveryFee;
    /**
     * 配送区域介绍
     */
    private String desc;
    /**
     * 开启定时达功能,定时达功能开启后timeBucket参数必填
     */
    private Boolean isOpen;
    /**
     * 纬度
     */
    private Float lat;
    /**
     * 径度
     */
    private Float lng;
    /**
     * 多边形区域配置
     */
    private String polygon;
    /**
     * 本地配送范围(里）
     */
    private Long scope;
    /**
     * 0：简单 1：半径 2：自定义
     */
    private Long scopeType;
    /**
     * 订单起送金额
     */
    private Long startFee;
    /**
     * 营业时间周期，2进制表示7天的开关，第一位是周一转换成List<LocalDeliveryTimeBucketParam>
     */
    private String timeBucket;
    /**
     * 送达时间细分 DAY 天；MEAL 上午下午晚上； HOUR 小时；HALFHOUR 半小时
     */
    private String timeSpan;

    public void setAheadMax(Long aheadMax) {
        this.aheadMax = aheadMax;
    }

    public Long getAheadMax() {
        return this.aheadMax;
    }

    public void setAheadMaxType(String aheadMaxType) {
        this.aheadMaxType = aheadMaxType;
    }

    public String getAheadMaxType() {
        return this.aheadMaxType;
    }

    public void setAheadMin(Long aheadMin) {
        this.aheadMin = aheadMin;
    }

    public Long getAheadMin() {
        return this.aheadMin;
    }

    public void setAheadMinType(String aheadMinType) {
        this.aheadMinType = aheadMinType;
    }

    public String getAheadMinType() {
        return this.aheadMinType;
    }

    public void setAttachPic(String attachPic) {
        this.attachPic = attachPic;
    }

    public String getAttachPic() {
        return this.attachPic;
    }

    public void setDeliveryFee(Long deliveryFee) {
        this.deliveryFee = deliveryFee;
    }

    public Long getDeliveryFee() {
        return this.deliveryFee;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setIsOpen(Boolean isOpen) {
        this.isOpen = isOpen;
    }

    public Boolean getIsOpen() {
        return this.isOpen;
    }

    public void setLat(Float lat) {
        this.lat = lat;
    }

    public Float getLat() {
        return this.lat;
    }

    public void setLng(Float lng) {
        this.lng = lng;
    }

    public Float getLng() {
        return this.lng;
    }

    public void setPolygon(String polygon) {
        this.polygon = polygon;
    }

    public String getPolygon() {
        return this.polygon;
    }

    public void setScope(Long scope) {
        this.scope = scope;
    }

    public Long getScope() {
        return this.scope;
    }

    public void setScopeType(Long scopeType) {
        this.scopeType = scopeType;
    }

    public Long getScopeType() {
        return this.scopeType;
    }

    public void setStartFee(Long startFee) {
        this.startFee = startFee;
    }

    public Long getStartFee() {
        return this.startFee;
    }

    public void setTimeBucket(String timeBucket) {
        this.timeBucket = timeBucket;
    }

    public String getTimeBucket() {
        return this.timeBucket;
    }

    public void setTimeSpan(String timeSpan) {
        this.timeSpan = timeSpan;
    }

    public String getTimeSpan() {
        return this.timeSpan;
    }


    public Map<String, Object> toParams() {
        Map<String, Object> params = Maps.newHashMap();
        if (aheadMax != null) {
            params.put("ahead_max", aheadMax);
        }
        if (aheadMaxType != null) {
            params.put("ahead_max_type", aheadMaxType);
        }
        if (aheadMin != null) {
            params.put("ahead_min", aheadMin);
        }
        if (aheadMinType != null) {
            params.put("ahead_min_type", aheadMinType);
        }
        if (attachPic != null) {
            params.put("attach_pic", attachPic);
        }
        if (deliveryFee != null) {
            params.put("delivery_fee", deliveryFee);
        }
        if (desc != null) {
            params.put("desc", desc);
        }
        if (isOpen != null) {
            params.put("is_open", isOpen);
        }
        if (lat != null) {
            params.put("lat", lat);
        }
        if (lng != null) {
            params.put("lng", lng);
        }
        if (polygon != null) {
            params.put("polygon", polygon);
        }
        if (scope != null) {
            params.put("scope", scope);
        }
        if (scopeType != null) {
            params.put("scope_type", scopeType);
        }
        if (startFee != null) {
            params.put("start_fee", startFee);
        }
        if (timeBucket != null) {
            params.put("time_bucket", timeBucket);
        }
        if (timeSpan != null) {
            params.put("time_span", timeSpan);
        }
        return params;
    }

    public Multimap<String, ByteWrapper> toFileParams() {
        Multimap<String, ByteWrapper> params = ArrayListMultimap.create();

            return params;
    }


}